// components/navi/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    title:String,
    first:Boolean,
    last: Boolean,
  },

  /**
   * 组件的初始数据
   */
  data: {
    leftImg:'images/triangle@left.png',
    disleftImg: 'images/triangle.dis@left.png',
    rightImg: 'images/triangle@right.png',
    disrightImg: 'images/triangle.dis@right.png',
  },

  /**
   * 组件的方法列表
   */
  methods: {
    next(event) {
      if (!this.properties.last){
      this.triggerEvent('next', {}, {})
      }
    },
    previous(event) {
      if (!this.properties.first) {
        this.triggerEvent('previous', {}, {})
      }
    }
  }
})
